package cn.com.cifi.mars.mapper.mars;
import cn.com.cifi.mars.entity.DmCityReturnCoefficient;
import cn.com.cifi.mars.entity.DmProjectReturnCoefficient;
import cn.com.cifi.mars.entity.ProjectReturnCoefficient;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 项目回款系数表 Mapper 接口
 * </p>
 *
 * @author JingYuanXiang
 * @since 2020-12-17
 */
public interface DmProjectReturnCoefficientMapper extends BaseMapper<DmProjectReturnCoefficient> {

    //查询各项目id及版本类型下最新版本
    List<ProjectReturnCoefficient> selectNewestVersionGroupByProjectIdAndVersionType(@Param("projectId") String projectId,@Param("yearMonth") String yearMonth);
    //批量写入
    void insertList(@Param("list") List<DmProjectReturnCoefficient> dmProjectReturnCoefficientList);
    //查询项目回款系数列表
    List<DmProjectReturnCoefficient> selectByAffiliationMonthAndVersionType(@Param("projectIdList") List<String> projectIdList, @Param("affiliationMonth") String affiliationMonth, @Param("versionTypeList") List<String> versionTypeList);

    List<DmCityReturnCoefficient> selectDmCityReturnCoefficient(@Param("time") LocalDateTime time);
}
